import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { CustomerServiceAgent } from './entities/agent.entity';
import { CustomerServiceSession } from './entities/session.entity';
import { CustomerServiceMessage } from './entities/message.entity';
import { CustomerServiceGroup } from './entities/group.entity';
import { CustomerServiceService } from './customer-service.service';
import { CustomerServiceController } from './customer-service.controller';
import { User } from '../user/user.entity';
import { CustomerServiceGateway } from './customer-service.gateway';
import { CustomerServiceAuthService } from './customer-service-auth.service';
import { CustomerServiceAuthController } from './customer-service-auth.controller';
import { JwtModule } from '@nestjs/jwt';

@Module({
  imports: [
    TypeOrmModule.forFeature([
      CustomerServiceAgent,
      CustomerServiceSession,
      CustomerServiceMessage,
      CustomerServiceGroup,
      User,
    ]),
    JwtModule.register({ secret: process.env.JWT_SECRET || 'cs_secret', signOptions: { expiresIn: '7d' } }),
  ],
  providers: [CustomerServiceService, CustomerServiceGateway, CustomerServiceAuthService],
  controllers: [CustomerServiceController, CustomerServiceAuthController],
  exports: [CustomerServiceService],
})
export class CustomerServiceModule {} 